//
//  constatnts.h
//  PortGo
//
//  Created by Joe Lepple on 4/28/13.
//  Copyright (c) 2013 PortSIP Solutions, Inc. All rights reserved.
//

#ifndef PortGo_constatnts_h
#define PortGo_constatnts_h

#define StringIsNull(strText) ((strText == nil) || ([strText length] == 0))
#define StringNotNull(strText) (strText && ([strText length] > 0))

typedef enum CallState_e{
	CALL_STATE_NONE,
	CALL_STATE_INCOMING,
	CALL_STATE_OUTGOING,
	CALL_STATE_INCALL,
	CALL_STATE_TERMINATED,
}
CallState_t;

//network
#define OPTIONS_NETWORK_TRANSPORT "NETWORK_TRANSPORT"
#define DEFALUT_OPTIONS_NETWORK_TRANSPORT 0//udp

#define OPTIONS_NETWORK_USE_3G "NETWORK_USE_3G"
#define DEFALUT_OPTIONS_NETWORK_USE_3G 1//enable 3G

#define OPTIONS_FORCE_BACGROUND "FORCE_BACKGROUND"
#define DEFALUT_OPTIONS_FORCE_BACKGROUND 1 //forceBackground

#define OPTIONS_ENABLE_CALLKIT "ENABLE_CALLKIT"
#define DEFAULT_OPTIONS_ENABLE_CALLKIT 0 //enable callkit

#define OPTIONS_AUTO_REG "AUTO_REG"
#define DEFALUT_OPTIONS_AUTO_REG 1//enable 3G

#define OPTIONS_NETWORK_USE_WIFI "NETWORK_USE_WIFI"
#define DEFALUT_OPTIONS_NETWORK_USE_WIFI 1//enable WIFI

#define OPTIONS_NETWORK_USE_SRTP "NETWORK_USE_SRTP"
#define DEFALUT_OPTIONS_NETWORK_USE_SRTP 0//no

//UUID
#define OPTIONS_DEVICE_UUID "DEVIECE_UUID"

#define OPTIONS_NATT_USE_STUN "NATT_USE_STUN"

#define OPTIONS_NATT_STUN_SERVER "NATT_STUN_SERVER"

#define OPTIONS_NATT_STUN_PORT "NATT_STUN_PORT"

#define OPRIONS_NATT_PRESENCE_AGENT "PRESENCE_AGENT"
#define OPTIONS_NATT_PUBLISH_REFRESH "PUBLISH_REFRESH"
#define OPTIONS_NATT_SUBSCRIBE_REFRESH "SUBSCRIBE_REFRESH"

#define OPTIONS_NATT_USE_CERT "USE_CERT"

#define DEFALUT_OPTIONS_NATT_USE_STUN 0//disable STUN
#define DEFALUT_OPTIONS_NATT_STUN_SERVER @"stun.iptel.org"
#define DEFALUT_OPTIONS_NATT_STUN_PORT 3478

#define DEFALUT_OPTIONS_NATT_PRESENCE_AGENT 1 //Presence Agent
#define DEFAULT_OPTIONS_NATT_PUBLISH_REFRESH 300
#define DEFAULT_OPTIONS_NATT_SUBSCRIBE_REFRESH 300

#define DEFAULT_OPTIONS_NATT_USE_CERT 0




//forward
#define OPTIONS_MEDIA_ENABLEFORWARD "OPTIONS_MEDIA_ENABLEFORWARD"
#define DEFALUT_OPTIONS_MEDIA_ENABLEFORWARD 0
#define OPTIONS_MEDIA_FORWARDTO "OPTIONS_MEDIA_FORWARDTO"
//audio features
#define OPTIONS_MEDIA_RTPPORTFROM "OPTIONS_MEDIA_RTPPORTFROM"
#define DEFALUT_OPTIONS_MEDIA_RTPPORTFROM 10000

#define OPTIONS_MEDIA_ENABLEVAD "OPTIONS_MEDIA_ENABLEVAD"
#define DEFALUT_OPTIONS_MEDIA_ENABLEVAD 0

#define OPTIONS_MEDIA_ENABLECNG "OPTIONS_MEDIA_ENABLECNG"
#define DEFALUT_OPTIONS_MEDIA_ENABLECNG 0

#define OPTIONS_MEDIA_DTMF_OF_INFO "OPTIONS_MEDIA_DTMF_OF_INFO"
#define DEFALUT_OPTIONS_MEDIA_DTMF_OF_INFO 0

#define OPTIONS_MEDIA_PLAY_DTMF_TONE "OPTIONS_MEDIA_PLAY_DTMF_TONE"
#define DEFALUT_OPTIONS_MEDIA_PLAY_DTMF_TONE 1


//video features
#define OPTIONS_PRECOND_BANDWIDTH "QOS_PRECOND_BANDWIDTH"
#define DEFALUT_OPTIONS_PRECOND_BANDWIDTH 512

#define OPTIONS_MEDIA_PREFERRED_VIDEO_SIZE "MEDIA_PREFERRED_VIDEO_SIZE"
#define DEFALUT_OPTIONS_MEDIA_PREFERRED_VIDEO_SIZE 1

#define OPTIONS_MEDIA_PREFERRED_VIDEO_FPS "MEDIA_PREFERRED_VIDEO_FPS"
#define DEFALUT_OPTIONS_MEDIA_PREFERRED_VIDEO_FPS 20

#define OPTIONS_MEDIA_PREFERRED_VIDEO_NACK "MEDIA_PREFERRED_VIDEO_NACK"
#define DEFALUT_OPTIONS_MEDIA_PREFERRED_VIDEO_NACK 1

// Default codec

#define OPTIONS_MEDIA_CODEC_USE_G722 "OPTIONS_MEDIA_CODEC_USE_G722"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_G722 0

#define OPTIONS_MEDIA_CODEC_USE_G729 "OPTIONS_MEDIA_CODEC_USE_G729"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_G729 1

#define OPTIONS_MEDIA_CODEC_USE_AMR "OPTIONS_MEDIA_CODEC_USE_AMR"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_AMR 0

#define OPTIONS_MEDIA_CODEC_USE_AMRWB "OPTIONS_MEDIA_CODEC_USE_AMRWB"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_AMRWB 0

#define OPTIONS_MEDIA_CODEC_USE_GSM "OPTIONS_MEDIA_CODEC_USE_GSM"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_GSM 0

#define OPTIONS_MEDIA_CODEC_USE_PCMA "OPTIONS_MEDIA_CODEC_USE_PCMA"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_PCMA 1

#define OPTIONS_MEDIA_CODEC_USE_PCMU "OPTIONS_MEDIA_CODEC_USE_PCMU"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_PCMU 1

#define OPTIONS_MEDIA_CODEC_USE_ILBC "OPTIONS_MEDIA_CODEC_USE_ILBC"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_ILBC 0

#define OPTIONS_MEDIA_CODEC_USE_SPEEX_NB "OPTIONS_MEDIA_CODEC_USE_SPEEX_NB"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_SPEEX_NB 0

#define OPTIONS_MEDIA_CODEC_USE_SPEEX_WB "OPTIONS_MEDIA_CODEC_USE_SPEEX_WB"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_SPEEX_WB 0

#define OPTIONS_MEDIA_CODEC_USE_OPUS "OPTIONS_MEDIA_CODEC_USE_OPUS"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_OPUS 1

#define OPTIONS_MEDIA_CODEC_USE_H263 "OPTIONS_MEDIA_CODEC_USE_H263"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_H263 0

#define OPTIONS_MEDIA_CODEC_USE_H263_1998 "OPTIONS_MEDIA_CODEC_USE_H263_1998"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_H263_1998 0

#define OPTIONS_MEDIA_CODEC_USE_H264 "OPTIONS_MEDIA_CODEC_USE_H264"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_H264 1

#define OPTIONS_MEDIA_CODEC_USE_VP8 "OPTIONS_MEDIA_CODEC_USE_VP8"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_VP8 1

#define OPTIONS_MEDIA_CODEC_USE_VP9 "OPTIONS_MEDIA_CODEC_USE_VP9"
#define DEFALUT_OPTIONS_MEDIA_CODEC_USE_VP9 1

#define OPTIONS_CALL_BADGE_COUNT "OPTIONS_CALL_BADGE_COUNT"
#define DEFALUT_OPTIONS_CALL_BADGE_COUNT 0

#define OPTIONS_MESSAGE_BADGE_COUNT "OPTIONS_MESSAGE_BADGE_COUNT"
#define DEFALUT_OPTIONS_MESSAGE_BADGE_COUNT 0

#define kDefaultMediaVsize_sqcif 0
#define kDefaultMediaVsize_qcif 1
#define kDefaultMediaVsize_qvga 2
#define kDefaultMediaVsize_cif 3
#define kDefaultMediaVsize_hvga 4
#define kDefaultMediaVsize_vga 5
#define kDefaultMediaVsize_4cif 6
#define kDefaultMediaVsize_svga 7
#define kDefaultMediaVsize_480p 8
#define kDefaultMediaVsize_720p 9
#define kDefaultMediaVsize_16cif 10
#define kDefaultMediaVsize_1080p 11

/* == Colors == */
#define kColorBlack				0x000000
#define kColorWhite				0xFFFFFF
#define kColorViolet			0x9900FF
#define kColorGray				0x736F6E
#define kColorBaloonOutTop		0xAFD662
#define kColorBaloonOutMiddle	0xBEDF7D
#define kColorBaloonOutBottom	0xD5E7B4
#define kColorBaloonOutBorder	0xC8E490
#define kColorBaloonInTop		0xDDDDDD
#define kColorBaloonInMiddle	0xD4D4D4
#define kColorBaloonInBottom	0xBEBEBE
#define kColorBaloonInBorder	0xBCBCBC


#define kColorsDarkBlack [NSArray arrayWithObjects: \
(id)[[UIColor colorWithRed:.1f green:.1f blue:.1f alpha:0.7] CGColor], \
(id)[[UIColor colorWithRed:0.f green:0.f blue:0.f alpha:0.7] CGColor], \
nil]
#define kColorsBlue [NSArray arrayWithObjects: \
(id)[[UIColor colorWithRed:.0f green:.0f blue:.5f alpha:0.7] CGColor], \
(id)[[UIColor colorWithRed:0.f green:0.f blue:1.f alpha:0.7] CGColor], \
nil]
#define kColorsLightBlack [NSArray arrayWithObjects: \
(id)[[UIColor colorWithRed:.2f green:.2f blue:.2f alpha:0.7] CGColor], \
(id)[[UIColor colorWithRed:.1f green:.1f blue:.1f alpha:0.7] CGColor], \
(id)[[UIColor colorWithRed:0.f green:0.f blue:0.f alpha:0.7] CGColor], \
nil]

#define kCallTimerSuicide	1.5f


//#define IS_iPhoneX ([UIScreen mainScreen].bounds.size.width == 375 && [UIScreen mainScreen].bounds.size.height == 812)


#endif
